package com.emser.unc.client.service;

import java.util.ArrayList;
import java.util.Date;

import com.emser.unc.serializable.ProductDTO;
import com.emser.unc.serializable.ResultDTO;
import com.emser.unc.shared.exception.NotLoggedInException;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("ProductService")
public interface ProductService extends RemoteService{
	boolean addProduct(String userAccountName, ProductDTO seller)throws NotLoggedInException;
	ResultDTO<ProductDTO> getProducts(String cursorString, int range, String userAccountName)throws NotLoggedInException;
	boolean deleteProducts(String userAccountName, ArrayList<Long> codeProducts)throws NotLoggedInException;
	boolean updateProduct(String userAccountName, ProductDTO seller)throws NotLoggedInException;
	ResultDTO<ProductDTO> getProductsSeller(String cursorString, int range,
			String userAccountName, String sellerKey) throws NotLoggedInException;;
	void addProductsSellerList(String userAccountName, ArrayList<Long> codeProducts,String sellerKey) throws NotLoggedInException;
	Integer getProductsCount(String userAccountName) throws NotLoggedInException;
	Integer getSearchedProductsCount(ArrayList<String> searchParam)throws NotLoggedInException;
	ResultDTO<ProductDTO> getSearchProducts(String cursorString, int range,ArrayList<String> searchParam)throws NotLoggedInException;
	Date updateStocks(String userAccountName)throws NotLoggedInException;
	Date getLastUpateDate(String userAccountName)throws NotLoggedInException;
}
